cmake_minimum_required(VERSION 3.8)
project(stereo_camera_pkg)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# 查找依赖项
find_package(ament_cmake REQUIRED)
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(cv_bridge REQUIRED)

# 确保 setup.py 中的依赖项与这里一致
if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # 以下是可选的测试依赖项，可以根据需要取消注释
  # ament_lint_auto_find_test_dependencies()
endif()

# 安装 Python 模块
ament_python_install_package(${PROJECT_NAME})

# 安装可执行文件
install(PROGRAMS
  ${PROJECT_NAME}/stereo_camera_node.py
  DESTINATION lib/${PROJECT_NAME}
)

ament_package()
